You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR adds generic SSL/TLS configuration support across IoTDB client and service paths without introducing provider-specific behavior.
Changes include:
Add a shared RpcSslUtils helper for SSL context setup, optional JSSE provider registration, and keystore/truststore type detection.
Wire generic SSL/TLS protocol and provider options through Session, JDBC, CLI import/export tools, Thrift transport creation, REST HTTPS, and Ratis certificate loading.
Add generic ssl_protocol and ssl_provider_class configuration entries. Cipher suites are not exposed as a user-facing configuration; transports use the defaults selected by the configured SSL/TLS protocol and provider.
Add JDBC URL parsing coverage for the new SSL/TLS parameters.
❌ Patch coverage is 20.34632% with 184 lines in your changes missing coverage. Please review.
✅ Project coverage is 40.83%. Comparing base (d563cd0) to head (4c3fe70). ⚠️ Report is 24 commits behind head on master.
I think there are two correctness issues in this PR:
ssl_protocol=TLS is used as both the SSLContext algorithm and Jetty enabled protocol for REST HTTPS. In RestService.configureSSL, the value is passed to sslContextFactory.setIncludeProtocols(protocol). The default template value is TLS, but JSSE enabled protocol names are normally TLSv1.3, TLSv1.2, etc., not TLS. So enabling REST HTTPS with the default config can leave Jetty with no matching enabled protocol / fail TLS handshakes. The context algorithm and enabled protocol list should be separate, or REST should not call setIncludeProtocols for the generic TLS value.
The legacy SSL overloads in BaseRpcTransportFactory now explicitly call the new overload with null, null, so internal synchronous SSL clients still do not use ssl_protocol / ssl_provider_class. For example SyncDataNodeInternalServiceClient, SyncConfigNodeIServiceClient, and IoT consensus sync clients call the old overload while enable_internal_ssl is true. If a custom JSSE provider is required, the server side may register it through CommonDescriptor.configureRpcSsl(), but these clients create their SSL transport without that provider and can fail to connect. These internal clients should pass commonConfig.getSslProtocol() and commonConfig.getSslProviderClass() to the new overload.
Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds generic SSL/TLS configuration support across IoTDB client and service paths without introducing provider-specific behavior.
Changes include:
RpcSslUtilshelper for SSL context setup, optional JSSE provider registration, and keystore/truststore type detection.ssl_protocolandssl_provider_classconfiguration entries. Cipher suites are not exposed as a user-facing configuration; transports use the defaults selected by the configured SSL/TLS protocol and provider.Validation
./mvnw spotless:apply -pl iotdb-client/service-rpc,iotdb-core/node-commons./mvnw -pl iotdb-client/service-rpc,iotdb-client/isession,iotdb-client/session,iotdb-client/jdbc,iotdb-client/cli,iotdb-core/node-commons -DskipTests compile./mvnw -pl iotdb-client/jdbc -Dtest=UtilsTest#testParseSslConfig testgit diff --check